package com.bw.day03.adapter

import android.graphics.Paint
import android.widget.TextView
import com.bw.base.net.entity.Team
import com.bw.day03.R
import com.bw.day03.util.GlideUtlis
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class TeamAdapter: BaseQuickAdapter<Team, BaseViewHolder>(R.layout.item_team) {
    override fun convert(
        holder: BaseViewHolder,
        item: Team
    ) {
        GlideUtlis.loadCorner(context,item.image,holder.getView(R.id.goods_image),20)
        holder.setText(R.id.goods_storeMessage,item.title)
        holder.setText(R.id.goods_price,"￥"+item.price)
        holder.setText(R.id.goods_otPrice,"￥"+item.otPrice)
        holder.setText(R.id.goods_sale,"已有"+item.people+"人拼团")
        var view = holder.getView<TextView>(R.id.goods_otPrice)
        view.paintFlags=Paint.STRIKE_THRU_TEXT_FLAG
    }
}